package com.stormrage.edu.dao.index.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.stormrage.edu.dao.index.IdxGuideDao;
import com.stormrage.entity.index.IdxGuide;
import com.stormragetech.core.dao.MysBaseDao;
import com.stormragetech.core.exception.StormrageTechException;

/**
 * @Title: IdxGuideDaoImpl.java
 * @Package com.stormrage.edu.dao.index.impl
 * @Description: 用户指南 Dao
 * @author www.stormragetech.com
 * @date 2016年4月16日
 * @version V1.0
 */
@Repository
public class IdxGuideDaoImpl extends MysBaseDao implements IdxGuideDao {

	private static final Logger logger = LoggerFactory.getLogger(IdxGuideDaoImpl.class);

	@Override
	public IdxGuide queryGuide() throws StormrageTechException {

		logger.debug(" 【 Dao 】-【 IdxGuideDao 】-【 QueryGuide 】-【 STARTED 】");

		final String query = "SELECT * FROM idx_guide WHERE id = 1";
		logger.debug(" 数据库执行语句为 " + query);

		IdxGuide entity = queryObject(query, IdxGuide.class, null);

		logger.debug(" 【 Dao 】-【 IdxGuideDao 】-【 QueryGuide 】-【 COMPLETED 】");
		return entity;

	}

}
